﻿<UserControl x:Class="DienLib.PopUp.PopUpWatch"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:local="clr-namespace:DienLib.PopUp"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="263" d:DesignWidth="805" BorderBrush="#FFF14A4A" BorderThickness="6" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" xmlns:my="clr-namespace:Aga.Controls.Tree;assembly=Aga.Controls" Width="600" Height="800">

    <UserControl.Resources>
        <local:RegImageConverter x:Key="RegImageConverter"/>
        <Style TargetType="{x:Type my:TreeListItem}">
            <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
        </Style>
        
        <Style TargetType="{x:Type my:TreeListItem}" x:Key="TreeListItemNodeStyle">
            <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <ContentPresenter Content="{TemplateBinding ContentControl.Content}" 
										  ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" 
										  HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" 
										  VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" 
										  SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
                        <ControlTemplate.Triggers>
                            <Trigger Property="UIElement.IsEnabled" Value="False">
                                <Setter Property="TextElement.Foreground">
                                    <Setter.Value>
                                        <DynamicResource ResourceKey="{x:Static SystemColors.GrayTextBrushKey}" />
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        
    </UserControl.Resources>

    <StackPanel Height="Auto" Name="stackPanel1" Width="Auto" Background="#FFF5F5C3">
        <TextBlock FontSize="14" FontWeight="Normal" Foreground="#FFB92B2B" Height="Auto" Name="textBlock1" Text="CAUTION : " TextAlignment="Left" TextWrapping="NoWrap" Width="Auto" HorizontalAlignment="Stretch" Margin="12" />
        <TextBlock FontSize="12" FontStyle="Normal" FontWeight="Normal" Height="Auto" Name="textBlock2" Padding="0" Text="Comment" TextAlignment="Left" TextWrapping="NoWrap" Width="Auto" Margin="12,0,12,12" VerticalAlignment="Center" HorizontalAlignment="Center" />
       
        <my:TreeList Height="660" Name="treeList1" Width="560" Margin="12,0">
            <my:TreeList.View>
                <GridView>
                    <GridView.Columns>

                        <GridViewColumn Width="400" Header="Name">
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <my:RowExpander/>
                                        <Image Source="{Binding Converter={StaticResource RegImageConverter}}"  Margin="0, 0, 5, 0"/>
                                        <TextBlock Text="{Binding Name}"></TextBlock>
                                    </StackPanel>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>

                        <GridViewColumn Header="Value" Width="50" DisplayMemberBinding="{Binding Kind}"/>
                        <GridViewColumn Header="Type" Width="100" DisplayMemberBinding="{Binding Data}"/>

                    </GridView.Columns>
                </GridView>
            </my:TreeList.View>
        </my:TreeList>
        
        <WrapPanel Height="Auto" Name="wrapPanel1" Width="Auto" VerticalAlignment="Center" HorizontalAlignment="Center">
            <Button BorderThickness="0" Content="OK" FlowDirection="LeftToRight" FontSize="16" FontWeight="Bold" Height="30" Margin="12" Name="button1" Width="140" VerticalAlignment="Center" HorizontalAlignment="Center" Click="button1_Click">
                <Button.Foreground>
                    <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                        <GradientStop Color="Black" Offset="0" />
                        <GradientStop Color="#FFAF0000" Offset="1" />
                    </LinearGradientBrush>
                </Button.Foreground>
            </Button>
        </WrapPanel>
    </StackPanel>
</UserControl>
